********************************************************************************
** REPLICATION SYNTAX FILE 1
** USE THIS FILE TO REPLICATE RESULTS FROM ANALYSES OF PANEL DATA IN WIDE FORMAT
********************************************************************************
*Load data file
use "masterfile_wide.dta", clear

*CAUTION: lINES MUST BE RUN IN ORDER TO ENSURE APPROPRIATE WEIGHTS ARE APPLIED TO REPLICATE RESULTS

********************************************************************************
** RECODES
********************************************************************************

gen newcov1_w1 = 0 if q57_w1 <= 2
replace newcov1_w1 = 1 if q57_w1 == 1
gen newcov1_w2 = 0 if q57_w2 <= 2 | q169_w2 <= 2 | (q0_w2 == 1 & q57_w1 == 1)
replace newcov1_w2 = 1 if q169_w2 == 1
gen newcov1_w3 = 0 if q57_w3 <= 2 | q169a_w3 <= 2 | q169b_w3 <= 2 | (q0_w3 == 1 & q57_w1 == 1) | (q0_w3 == 1 & q57_w2 == 1)
replace newcov1_w3 = 1 if q169a_w3 == 1 | q169b_w3 == 1
gen newcov1_w4 = 0 if q57_w4 <= 2 | q169a_w4 <= 2 | q169b_w4 <= 2 | q169c_w4 <= 2 | (q0_w4 == 1 & q57_w1 == 1) | (q0_w4 == 1 & q57_w2 == 1) | (q0_w4 == 1 & q57_w3 == 1)
replace newcov1_w4 = 1 if q169a_w4 == 1 | q169b_w4 == 1 | q169c_w4 == 1
gen newcov1_w5 = 0 if q57_w5 <= 2
replace newcov1_w5 = 1 if q169_w5 == 1 & q57_w5 == 1

gen evercov1hh_w1 = 0 if q64_w1 <= 9 | q166_w1 == 1
replace evercov1hh_w1 = 1 if q64_w1 == 1
gen newcov1hh_w1 = 0 if q64_w1 <= 9 | q166_w1 == 1
replace newcov1hh_w1 = 1 if q64_w1 == 1

gen newcov1hh_w2 = 0 if q64_w2 <= 9 | q176_w2 <= 2 | q166_w2 == 1
replace newcov1hh_w2 = 1 if q176_w2 == 1
gen newcov1hh_w3 = 0 if q64_w3 <= 2 | q176a_w3 <= 2 | q176b_w3 <= 2 | q166_w3 == 1
replace newcov1hh_w3 = 1 if q176a_w3 == 1 | q176b_w3 == 1
gen newcov1hh_w4 = 0 if q64_w4 <= 2 | q176a_w4 <= 2 | q176b_w4 <= 2 | q176c_w4 <= 2 | q166_w4 == 1
replace newcov1hh_w4 = 1 if q176a_w4 == 1 | q176b_w4 == 1 | q176c_w4 == 1
gen newcov1hh_w5 = 0 if q64_w5 <= 9 | q166_w5 == 1
replace newcov1hh_w5 = 1 if q64_w5 == 1 & q176_w5 == 1

gen newcov1any_w1 = 0 if q70_w1 <= 2 
replace newcov1any_w1 = 1 if q70_w1 == 1
gen newcov1any_w2 = 0 if q70_w2 <= 2 | q182_w2 <= 2 
replace newcov1any_w2 = 1 if q182_w2 == 1
gen newcov1any_w3 = 0 if q70_w3 <= 2 | q182a_w3 <= 2 | q182b_w3 <= 2 
replace newcov1any_w3 = 1 if q182a_w3 == 1 | q182b_w3 == 1
gen newcov1any_w4 = 0 if q70_w4 <= 2 | q182a_w4 <= 2 | q182b_w4 <= 2 | q182c_w4 <= 2
replace newcov1any_w4 = 1 if q182a_w4 == 1 | q182b_w4 == 1 | q182c_w4 == 1
gen newcov1any_w5 = 0 if q70_w5 <= 9 
replace newcov1any_w5 = 1 if q70_w5 == 1 & q182_w5 == 1

gen newpay_w1 = 0 if q60_w1 <= 2
replace newpay_w1 = 1 if q60_w1 == 1
gen newpay_w2 = 0 if q60_w2 <= 2 | q172_w2 <= 2
replace newpay_w2 = 1 if q172_w2 == 1
gen newpay_w3 = 0 if q60_w3 <= 2 | q172a_w3 <= 2 | q172b_w3 <= 2 
replace newpay_w3 = 1 if q172a_w3 == 1 | q172b_w3 == 1
gen newpay_w4 = 0 if q60_w4 <= 2 | q172a_w4 <= 2 | q172b_w4 <= 2 | q172c_w4 <= 2 
replace newpay_w4 = 1 if q172a_w4 == 1 | q172b_w4 == 1 | q172c_w4 == 1
gen newpay_w5 = 0 if q60_w5 <= 2
replace newpay_w5 = 1 if q60_w5 == 1 & q172_w5 == 1

gen newdiehh_w1 = 0 if q66_w1 <= 9 | q166_w1 == 1
replace newdiehh_w1 = 1 if q66_w1 == 1
gen newdiehh_w2 = 0 if q66_w2 <= 2 | q178_w2 <= 2 | q166_w2 == 1
replace newdiehh_w2 = 1 if q178_w2 == 1
gen newdiehh_w3 = 0 if q66_w3 <= 2 | q178a_w3 <= 2 | q178b_w3 <= 2 | q166_w3 == 1
replace newdiehh_w3 = 1 if q178a_w3 == 1 | q178b_w3 == 1
gen newdiehh_w4 = 0 if q66_w4 <= 2 | q178a_w4 <= 2 | q178b_w4 <= 2 | q178c_w4 <= 2 | q166_w4 == 1
replace newdiehh_w4 = 1 if q178a_w4 == 1 | q178b_w4 == 1 | q178c_w4 == 1
gen newdiehh_w5 = 0 if q66_w5 <= 9 | q166_w5 == 1
replace newdiehh_w5 = 1 if q66_w5 == 1 & q178_w5 == 1

gen newjobhh_w1 = 0 if q67_w1 <= 9 | q166_w1 == 1
replace newjobhh_w1 = 1 if q67_w1 == 1
gen newjobhh_w2 = 0 if q67_w2 <= 2 | q179_w2 <= 2 | q166_w2 == 1
replace newjobhh_w2 = 1 if q179_w2 == 1
gen newjobhh_w3 = 0 if q67_w3 <= 2 | q179a_w3 <= 2 | q179b_w3 <= 2 | q166_w3 == 1
replace newjobhh_w3 = 1 if q179a_w3 == 1 | q179b_w3 == 1
gen newjobhh_w4 = 0 if q67_w4 <= 2 | q179a_w4 <= 2 | q179b_w4 <= 2 | q179c_w4 <= 2 | q166_w4 == 1
replace newjobhh_w4 = 1 if q179a_w4 == 1 | q179b_w4 == 1 | q179c_w4 == 1
gen newjobhh_w5 = 0 if q67_w5 <= 9 | q166_w5 == 1
replace newjobhh_w5 = 1 if q67_w5 == 1 & q179_w5 == 1

gen newdieany_w1 = 0 if q72_w1 <= 2
replace newdieany_w1 = 1 if q72_w1 == 1
gen newdieany_w2 = 0 if q72_w2 <= 2 | q184_w2 <= 2 
replace newdieany_w2 = 1 if q184_w2 == 1
gen newdieany_w3 = 0 if q72_w3 <= 2 | q184a_w3 <= 2 | q184b_w3 <= 2 
replace newdieany_w3 = 1 if q184a_w3 == 1 | q184b_w3 == 1
gen newdieany_w4 = 0 if q72_w4 <= 2 | q184a_w4 <= 2 | q184b_w4 <= 2 | q184c_w4 <= 2 
replace newdieany_w4 = 1 if q184a_w4 == 1 | q184b_w4 == 1 | q184c_w4 == 1
gen newdieany_w5 = 0 if q72_w5 <= 9 
replace newdieany_w5 = 1 if q72_w5 == 1 & q184_w5 == 1

forvalues j=2/4 {
	forvalues i=188/191 {
		gen q`i'r_w`j' = 4 - q`i'_w`j'
		}
	}
gen q192r_w4 = 4 - q192_w4
forvalues j=2/3 {
	gen q194r_w`j' = 4 - q194_w`j'
	}
forvalues j=2/4 {
		gen q195r_w`j' = 4 - q195_w`j'
	}	
gen q197r_w4 = 4 - q197_w4

egen hltnewsneg_w2 = rowmean(q188r_w2 q194r_w2)
gen hltnewspos_w2 = q189r_w2
egen econewsneg_w2 = rowmean(q190r_w2 q195r_w2)
gen econewspos_w2 = q191r_w2
egen hltnewsneg_w3 = rowmean(q188r_w3 q194r_w3)
gen hltnewspos_w3 = q189r_w3
egen econewsneg_w3 = rowmean(q190r_w3 q195r_w3)
gen econewspos_w3 = q191r_w3
egen hltnewsneg_w4 = rowmean(q188r_w4 q195r_w4 q197r_w4)
gen hltnewspos_w4 = q189r_w4
egen econewsneg_w4 = rowmean(q191r_w4 q192r_w4)
gen econewspos_w4 = q190r_w4

forvalues j=1/5{
	gen newcov1all_w`j' = newcov1any_w`j'
	replace newcov1all_w`j' = 1 if newcov1hh_w`j' == 1
	gen newdieall_w`j' = newdieany_w`j'
	replace newdieall_w`j' = 1 if newdiehh_w`j' == 1
	gen cases_curr_pthou_w`j' = cases_curr_w`j'/(parishpop_w`j'/1000)
	}
	
forvalues j=1/5{
	forvalues i=2/4 {
		gen q`i'_w`j'r = 6 - q`i'_w`j'
		}
	forvalues i=11/13 {
		gen q`i'_w`j'r = 6 - q`i'_w`j'
		}
	}

forvalues j=1/5{
	egen anx_hlt1_w`j' = rowmean(q2_w`j'r q3_w`j'r q4_w`j'r) 
	egen anx_eco1_w`j' = rowmean(q11_w`j'r q12_w`j'r q13_w`j'r) 
	}

forvalues j=1/5 {
	gen q94_w`j'r = 1 if q94_w`j' == 1
	replace q94_w`j'r = 2 if q94_w`j' == 3
	replace q94_w`j'r = 3 if q94_w`j' == 2
	}

forvalues j=1/5 {
	forvalues i=95/103 {
		gen q`i'_w`j'r = 6 - q`i'_w`j'
		}
	}

forvalues j=1/5{
	gen q106_w`j'r = 5 - q106_w`j'
	}

forvalues j=4/5{
	gen q202_w`j'r = 6 - q202_w`j'
	}

forvalues j=4/5{
	gen q203a_w`j'r = 6 - q203a_w`j'
	}

forvalues j=4/5{
	gen q203b_w`j'r = 6 - q203b_w`j'
	}
	
forvalues j=1/5{
	forvalues i=107/111 {
		gen q`i'_w`j'r = 5 - q`i'_w`j' if q`i'_w`j' <= 4 
		}	
	}
	
forvalues j=3/5{
	gen q201_w`j'r = 5 - q201_w`j' if q201_w`j' <= 4 
	}
	
egen ecpol_w1r = rowmean(q95_w1r q100_w1r q103_w1r)
egen ecpol_w2r = rowmean(q95_w2r q100_w2r q103_w2r)
egen ecpol_w3r = rowmean(q95_w3r q100_w3r q103_w3r)
egen ecpol_w4r = rowmean(q95_w4r q100_w4r q103_w4r q202_w4r)
egen ecpol_w5r = rowmean(q95_w5r q100_w5r q103_w5r q202_w5r)

egen hltpol2_w1r = rowmean(q96_w1r q97_w1r q98_w1r q99_w1r q102_w1r)
egen hltpol2_w2r = rowmean(q96_w2r q97_w2r q98_w2r q99_w2r q102_w2r)
egen hltpol2_w3r = rowmean(q96_w3r q97_w3r q98_w3r q99_w3r q102_w3r)
egen hltpol2_w4r = rowmean(q96_w4r q97_w4r q98_w4r q99_w4r q102_w4r)
egen hltpol2_w5r = rowmean(q96_w5r q97_w5r q98_w5r q99_w5r q102_w5r)

egen allpol_w1r = rowmean(q95_w1r q100_w1r q103_w1r q96_w1r q97_w1r q98_w1r q99_w1r q102_w1r)
egen allpol_w2r = rowmean(q95_w2r q100_w2r q103_w2r q96_w2r q97_w2r q98_w2r q99_w2r q102_w2r)
egen allpol_w3r = rowmean(q95_w3r q100_w3r q103_w3r q96_w3r q97_w3r q98_w3r q99_w3r q102_w3r)
egen allpol_w4r = rowmean(q95_w4r q100_w4r q103_w4r q202_w4r q96_w4r q97_w4r q98_w4r q99_w4r q102_w4r q203a_w4r q203b_w4r)
egen allpol_w5r = rowmean(q95_w5r q100_w5r q103_w5r q202_w5r q96_w5r q97_w5r q98_w5r q99_w5r q102_w5r q203a_w5r q203b_w5r)

gen pid3lr = 1 if pid7 <= 3
replace pid3lr = 2 if pid7 >= 5 & pid7 <= 7
replace pid3lr = 3 if pid7 == 4 | pid7 == 8

gen racer = 3 if race <= 8
replace racer = race if race == 1
replace racer = race if race == 2

gen ager = 2020 - birthyr
gen agecatr = 1 if ager >= 18 & ager <= 29
replace agecatr = 2 if ager >= 30 & ager <= 39
replace agecatr = 3 if ager >= 40 & ager <= 49
replace agecatr = 4 if ager >= 50 & ager <= 59
replace agecatr = 5 if ager >= 60 & ager <= 99

gen femaler = gender - 1

gen colg4r = 1 if educ <= 6
replace colg4r = 0 if educ <= 4

forvalues i=1/5{
	gen faminc_new_w`i'r = 1 if faminc_new_w`i' <= 3
	replace faminc_new_w`i'r = 2 if faminc_new_w`i' >= 4 & faminc_new_w`i' <= 5
	replace faminc_new_w`i'r = 3 if faminc_new_w`i' >= 6 & faminc_new_w`i' <= 9
	replace faminc_new_w`i'r = 4 if faminc_new_w`i' >= 10 & faminc_new_w`i' <= 16
	}

gen ideo5r = ideo5 if ideo5 <= 5

gen newsintr = 5 - newsint if newsint <= 4

forvalues i=1/5{
	gen q159_w`i'r = 1 if q159_w`i' == 1
	replace q159_w`i'r = 0 if q159_w`i' == 2
	}

forvalues i=1/5{
	gen q160_w`i'r = 1 if q160_w`i' == 1
	replace q160_w`i'r = 0 if q160_w`i' == 2
	}

********************************************************************************
* REPLICATE TABLES 1-2 & SUPPLEMENTARY TABLES 1-5
********************************************************************************

*Wave 1 Analysis	
svyset [pweight=weight_w1]
**Replicate wave 1 estimates for figures 2 and 3
svy: proportion newcov1_w1 newpay_w1 newjobhh_w1 newcov1any_w1 newdieall_w1
svy: mean anx_hlt1_w1 
svy: mean anx_eco1_w1

**Replicate supplementary table 1 column 1
svy: logit newcov1_w1 i.pid3lr i.racer i.agecatr i.femaler i.colg4r c.faminc_new_w1r c.ideo5r c.newsintr i.q159_w1r i.q160_w1r
outreg2 using "apptable1.xls", stats(coef se pval) bracket(se) paren(pval) label replace dec(3)

**Replicate supplementary table 2 column 1
svy: logit newcov1all_w1 i.pid3lr i.racer i.agecatr i.femaler i.colg4r c.faminc_new_w1r c.ideo5r c.newsintr i.q159_w1r i.q160_w1r
outreg2 using "apptable2.xls", stats(coef se pval) bracket(se) paren(pval) label replace dec(3)

**Replicate supplementary table 3 column 1
svy: logit newdieall_w1 i.pid3lr i.racer i.agecatr i.femaler i.colg4r c.faminc_new_w1r c.ideo5r c.newsintr i.q159_w1r i.q160_w1r
outreg2 using "apptable3.xls", stats(coef se pval) bracket(se) paren(pval) label replace dec(3)

**Replicate table 1 column 1
svy: reg anx_hlt1_w1 i.pid3lr i.racer i.agecatr i.femaler i.colg4r c.faminc_new_w1r c.ideo5r c.newsintr i.q159_w1r i.q160_w1r newcov1_w1 newdieall_w1 cases_curr_pthou_w1 
outreg2 using "table1.xls", stats(coef se pval) bracket(se) paren(pval) label replace dec(3)

**Replicate supplementary table 4 column 1
svy: logit newpay_w1 i.pid3lr i.racer i.agecatr i.femaler i.colg4r c.faminc_new_w1r c.ideo5r c.newsintr i.q159_w1r i.q160_w1r
outreg2 using "apptable4.xls", stats(coef se pval) bracket(se) paren(pval) label replace dec(3)

**Replicate supplementary table 5 column 1
svy: logit newjobhh_w1 i.pid3lr i.racer i.agecatr i.femaler i.colg4r c.faminc_new_w1r c.ideo5r c.newsintr i.q159_w1r i.q160_w1r
outreg2 using "apptable5.xls", stats(coef se pval) bracket(se) paren(pval) label replace dec(3)

**Replicate table 2 column 1
svy: reg anx_eco1_w1 i.pid3lr i.racer i.agecatr i.femaler i.colg4r c.faminc_new_w1r c.ideo5r c.newsintr i.q159_w1r i.q160_w1r newpay_w1 newjobhh_w1 ur_w1 
outreg2 using "table2.xls", stats(coef se pval) bracket(se) paren(pval) label replace dec(3)

*Wave 2 Analysis	
svyset [pweight=weight_w2]
**Replicate wave 2 estimates for figures 2 and 3
svy: proportion newcov1_w2 newpay_w2 newjobhh_w2 newcov1all_w2 newdieall_w2
svy: mean anx_hlt1_w2 
svy: mean anx_eco1_w2

**Replicate supplementary table 1 column 2
svy: logit newcov1_w2 i.pid3lr i.racer i.agecatr i.femaler i.colg4r c.faminc_new_w2r c.ideo5r c.newsintr i.q159_w2r i.q160_w2r
outreg2 using "apptable1.xls", stats(coef se pval) bracket(se) paren(pval) label append dec(3)

**Replicate supplementary table 2 column 2
svy: logit newcov1all_w2 i.pid3lr i.racer i.agecatr i.femaler i.colg4r c.faminc_new_w2r c.ideo5r c.newsintr i.q159_w2r i.q160_w2r
outreg2 using "apptable2.xls", stats(coef se pval) bracket(se) paren(pval) label append dec(3)

**Replicate supplementary table 3 column 2
svy: logit newdieall_w2 i.pid3lr i.racer i.agecatr i.femaler i.colg4r c.faminc_new_w2r c.ideo5r c.newsintr i.q159_w2r i.q160_w2r
outreg2 using "apptable3.xls", stats(coef se pval) bracket(se) paren(pval) label append dec(3)

**Replicate table 1 column 2
svy: reg anx_hlt1_w2 i.pid3lr i.racer i.agecatr i.femaler i.colg4r c.faminc_new_w2r c.ideo5r c.newsintr i.q159_w2r i.q160_w2r newcov1_w2 newdieall_w2 cases_curr_pthou_w2 
outreg2 using "table1.xls", stats(coef se pval) bracket(se) paren(pval) label append dec(3)

**Replicate supplementary table 4 column 2
svy: logit newpay_w2 i.pid3lr i.racer i.agecatr i.femaler i.colg4r c.faminc_new_w2r c.ideo5r c.newsintr i.q159_w2r i.q160_w2r
outreg2 using "apptable4.xls", stats(coef se pval) bracket(se) paren(pval) label append dec(3)

**Replicate supplementary table 5 column 2
svy: logit newjobhh_w2 i.pid3lr i.racer i.agecatr i.femaler i.colg4r c.faminc_new_w2r c.ideo5r c.newsintr i.q159_w2r i.q160_w2r
outreg2 using "apptable5.xls", stats(coef se pval) bracket(se) paren(pval) label append dec(3)

**Replicate table 2 column 2
svy: reg anx_eco1_w2 i.pid3lr i.racer i.agecatr i.femaler i.colg4r c.faminc_new_w2r c.ideo5r c.newsintr i.q159_w2r i.q160_w2r newpay_w2 newjobhh_w2 ur_w2 
outreg2 using "table2.xls", stats(coef se pval) bracket(se) paren(pval) label append dec(3)

*Wave 3 Analysis	
svyset [pweight=weight_w3]
**Replicate wave 3 estimates for figures 2 and 3
svy: proportion newcov1_w3 newpay_w3 newjobhh_w3 newcov1all_w3 newdieall_w3
svy: mean anx_hlt1_w3 
svy: mean anx_eco1_w3

**Replicate supplementary table 1 column 3
svy: logit newcov1_w3 i.pid3lr i.racer i.agecatr i.femaler i.colg4r c.faminc_new_w3r c.ideo5r c.newsintr i.q159_w3r i.q160_w3r
outreg2 using "apptable1.xls", stats(coef se pval) bracket(se) paren(pval) label append dec(3)

**Replicate supplementary table 2 column 3
svy: logit newcov1all_w3 i.pid3lr i.racer i.agecatr i.femaler i.colg4r c.faminc_new_w3r c.ideo5r c.newsintr i.q159_w3r i.q160_w3r
outreg2 using "apptable2.xls", stats(coef se pval) bracket(se) paren(pval) label append dec(3)

**Replicate supplementary table 3 column 3
svy: logit newdieall_w3 i.pid3lr i.racer i.agecatr i.femaler i.colg4r c.faminc_new_w3r c.ideo5r c.newsintr i.q159_w3r i.q160_w3r
outreg2 using "apptable3.xls", stats(coef se pval) bracket(se) paren(pval) label append dec(3)

**Replicate table 1 column 3
svy: reg anx_hlt1_w3 i.pid3lr i.racer i.agecatr i.femaler i.colg4r c.faminc_new_w3r c.ideo5r c.newsintr i.q159_w3r i.q160_w3r newcov1_w3 newdieall_w3 cases_curr_pthou_w3 
outreg2 using "table1.xls", stats(coef se pval) bracket(se) paren(pval) label append dec(3)

**Replicate supplementary table 4 column 3
svy: logit newpay_w3 i.pid3lr i.racer i.agecatr i.femaler i.colg4r c.faminc_new_w3r c.ideo5r c.newsintr i.q159_w3r i.q160_w3r
outreg2 using "apptable4.xls", stats(coef se pval) bracket(se) paren(pval) label append dec(3)

**Replicate supplementary table 5 column 3
svy: logit newjobhh_w3 i.pid3lr i.racer i.agecatr i.femaler i.colg4r c.faminc_new_w3r c.ideo5r c.newsintr i.q159_w3r i.q160_w3r
outreg2 using "apptable5.xls", stats(coef se pval) bracket(se) paren(pval) label append dec(3)

**Replicate table 2 column 3
svy: reg anx_eco1_w3 i.pid3lr i.racer i.agecatr i.femaler i.colg4r c.faminc_new_w3r c.ideo5r c.newsintr i.q159_w3r i.q160_w3r newpay_w3 newjobhh_w3 ur_w3 
outreg2 using "table2.xls", stats(coef se pval) bracket(se) paren(pval) label append dec(3)

*Wave 4 Analysis	
svyset [pweight=weight_w4]
**Replicate wave 4 estimates for figures 2 and 3
svy: proportion newcov1_w4 newpay_w4 newjobhh_w4 newcov1all_w4 newdieall_w4
svy: mean anx_hlt1_w4 
svy: mean anx_eco1_w4

**Replicate supplementary table 1 column 4
svy: logit newcov1_w4 i.pid3lr i.racer i.agecatr i.femaler i.colg4r c.faminc_new_w4r c.ideo5r c.newsintr i.q159_w4r i.q160_w4r
outreg2 using "apptable1.xls", stats(coef se pval) bracket(se) paren(pval) label append dec(3)

**Replicate supplementary table 2 column 4
svy: logit newcov1all_w4 i.pid3lr i.racer i.agecatr i.femaler i.colg4r c.faminc_new_w4r c.ideo5r c.newsintr i.q159_w4r i.q160_w4r
outreg2 using "apptable2.xls", stats(coef se pval) bracket(se) paren(pval) label append dec(3)

**Replicate supplementary table 3 column 4
svy: logit newdieall_w4 i.pid3lr i.racer i.agecatr i.femaler i.colg4r c.faminc_new_w4r c.ideo5r c.newsintr i.q159_w4r i.q160_w4r
outreg2 using "apptable3.xls", stats(coef se pval) bracket(se) paren(pval) label append dec(3)
 
**Replicate table 1 column 4
svy: reg anx_hlt1_w4 i.pid3lr i.racer i.agecatr i.femaler i.colg4r c.faminc_new_w4r c.ideo5r c.newsintr i.q159_w4r i.q160_w4r newcov1_w4 newdieall_w4 cases_curr_pthou_w4 
outreg2 using "table1.xls", stats(coef se pval) bracket(se) paren(pval) label append dec(3)

**Replicate supplementary table 4 column 4
svy: logit newpay_w4 i.pid3lr i.racer i.agecatr i.femaler i.colg4r c.faminc_new_w4r c.ideo5r c.newsintr i.q159_w4r i.q160_w4r
outreg2 using "apptable4.xls", stats(coef se pval) bracket(se) paren(pval) label append dec(3)

**Replicate supplementary table 5 column 4
svy: logit newjobhh_w4 i.pid3lr i.racer i.agecatr i.femaler i.colg4r c.faminc_new_w4r c.ideo5r c.newsintr i.q159_w4r i.q160_w4r
outreg2 using "apptable5.xls", stats(coef se pval) bracket(se) paren(pval) label append dec(3)

**Replicate table 2 column 4
svy: reg anx_eco1_w4 i.pid3lr i.racer i.agecatr i.femaler i.colg4r c.faminc_new_w4r c.ideo5r c.newsintr i.q159_w4r i.q160_w4r newpay_w4 newjobhh_w4 ur_w4 
outreg2 using "table2.xls", stats(coef se pval) bracket(se) paren(pval) label append dec(3)

*Wave 5 Analysis	
svyset [pweight=weight_w5]
**Replicate wave 4 estimates for figures 2 and 3
svy: proportion newcov1_w5 newpay_w5 newjobhh_w5 newcov1all_w5 newdieall_w5
svy: mean anx_hlt1_w5 
svy: mean anx_eco1_w5

**Replicate supplementary table 1 column 5
svy: logit newcov1_w5 i.pid3lr i.racer i.agecatr i.femaler i.colg4r c.faminc_new_w5r c.ideo5r c.newsintr i.q159_w5r i.q160_w5r
outreg2 using "apptable1.xls", stats(coef se pval) bracket(se) paren(pval) label append dec(3)

**Replicate supplementary table 2 column 5
svy: logit newcov1all_w5 i.pid3lr i.racer i.agecatr i.femaler i.colg4r c.faminc_new_w5r c.ideo5r c.newsintr i.q159_w5r i.q160_w5r
outreg2 using "apptable2.xls", stats(coef se pval) bracket(se) paren(pval) label append dec(3)

**Replicate supplementary table 3 column 5
svy: logit newdieall_w5 i.pid3lr i.racer i.agecatr i.femaler i.colg4r c.faminc_new_w5r c.ideo5r c.newsintr i.q159_w5r i.q160_w5r
outreg2 using "apptable3.xls", stats(coef se pval) bracket(se) paren(pval) label append dec(3)
 
**Replicate table 1 column 5
svy: reg anx_hlt1_w5 i.pid3lr i.racer i.agecatr i.femaler i.colg4r c.faminc_new_w5r c.ideo5r c.newsintr i.q159_w5r i.q160_w5r newcov1_w5 newdieall_w5 cases_curr_pthou_w5 
outreg2 using "table1.xls", stats(coef se pval) bracket(se) paren(pval) label append dec(3)

**Replicate supplementary table 4 column 5
svy: logit newpay_w5 i.pid3lr i.racer i.agecatr i.femaler i.colg4r c.faminc_new_w5r c.ideo5r c.newsintr i.q159_w5r i.q160_w5r
outreg2 using "apptable4.xls", stats(coef se pval) bracket(se) paren(pval) label append dec(3)

**Replicate supplementary table 5 column 5
svy: logit newjobhh_w5 i.pid3lr i.racer i.agecatr i.femaler i.colg4r c.faminc_new_w5r c.ideo5r c.newsintr i.q159_w5r i.q160_w5r
outreg2 using "apptable5.xls", stats(coef se pval) bracket(se) paren(pval) label append dec(3)
 
**Replicate table 2 column 5
svy: reg anx_eco1_w5 i.pid3lr i.racer i.agecatr i.femaler i.colg4r c.faminc_new_w5r c.ideo5r c.newsintr i.q159_w5r i.q160_w5r newpay_w5 newjobhh_w5 ur_w5 
outreg2 using "table2.xls", stats(coef se pval) bracket(se) paren(pval) label append dec(3)

********************************************************************************
* REPLICATE TABLE 4 & SUPPLEMENTARY TABLES 30-31
********************************************************************************

svyset [pweight=weight_w2]
**Replicate table 4 column 1
svy: reg anx_hlt1_w2 anx_hlt1_w1 q106_w1r ///
	i.pid3lr i.racer i.agecatr i.femaler i.colg4r c.faminc_new_w2r c.ideo5r c.newsintr ///
	i.q159_w2r i.q160_w2r newcov1_w2 newdieall_w2 cases_curr_pthou_w2  
outreg2 using "table4.xls", stats(coef se pval) bracket(se) paren(pval) label replace dec(3)

**Replicate table 4 column 2
svy: reg q106_w2r anx_hlt1_w1 q106_w1r ///
	i.pid3lr i.racer i.agecatr i.femaler i.colg4r c.faminc_new_w2r c.ideo5r c.newsintr ///
	i.q159_w2r i.q160_w2r newcov1_w2 newdieall_w2 cases_curr_pthou_w2  
outreg2 using "table4.xls", stats(coef se pval) bracket(se) paren(pval) label append dec(3)

svyset [pweight=weight_w3]
**Replicate table 4 column 3
svy: reg anx_hlt1_w3 anx_hlt1_w2 q106_w2r ///
	i.pid3lr i.racer i.agecatr i.femaler i.colg4r c.faminc_new_w3r c.ideo5r c.newsintr ///
	i.q159_w3r i.q160_w3r newcov1_w3 newdieall_w3 cases_curr_pthou_w3  
outreg2 using "table4.xls", stats(coef se pval) bracket(se) paren(pval) label append dec(3)

**Replicate table 4 column 4
svy: reg q106_w3r anx_hlt1_w2 q106_w2r ///
	i.pid3lr i.racer i.agecatr i.femaler i.colg4r c.faminc_new_w3r c.ideo5r c.newsintr ///
	i.q159_w3r i.q160_w3r newcov1_w3 newdieall_w3 cases_curr_pthou_w3  
outreg2 using "table4.xls", stats(coef se pval) bracket(se) paren(pval) label append dec(3)

svyset [pweight=weight_w4]
**Replicate table 4 column 5
svy: reg anx_hlt1_w4 anx_hlt1_w3 q106_w3r ///
	i.pid3lr i.racer i.agecatr i.femaler i.colg4r c.faminc_new_w4r c.ideo5r c.newsintr ///
	i.q159_w4r i.q160_w4r newcov1_w4 newdieall_w4 cases_curr_pthou_w4  
outreg2 using "table4.xls", stats(coef se pval) bracket(se) paren(pval) label append dec(3)

**Replicate table 4 column 6
svy: reg q106_w4r anx_hlt1_w3 q106_w3r ///
	i.pid3lr i.racer i.agecatr i.femaler i.colg4r c.faminc_new_w4r c.ideo5r c.newsintr ///
	i.q159_w4r i.q160_w4r newcov1_w4 newdieall_w4 cases_curr_pthou_w4  
outreg2 using "table4.xls", stats(coef se pval) bracket(se) paren(pval) label append dec(3)

svyset [pweight=weight_w5]
**Replicate table 4 column 7
svy: reg anx_hlt1_w5 anx_hlt1_w4 q106_w4r ///
	i.pid3lr i.racer i.agecatr i.femaler i.colg4r c.faminc_new_w5r c.ideo5r c.newsintr ///
	i.q159_w5r i.q160_w5r newcov1_w5 newdieall_w5 cases_curr_pthou_w5  
outreg2 using "table4.xls", stats(coef se pval) bracket(se) paren(pval) label append dec(3)

**Replicate table 4 column 8
svy: reg q106_w5r anx_hlt1_w4 q106_w4r ///
	i.pid3lr i.racer i.agecatr i.femaler i.colg4r c.faminc_new_w5r c.ideo5r c.newsintr ///
	i.q159_w5r i.q160_w5r newcov1_w5 newdieall_w5 cases_curr_pthou_w5  
outreg2 using "table4.xls", stats(coef se pval) bracket(se) paren(pval) label append dec(3)

svyset [pweight=weight_w3]
**Replicate supplementary table 30 column 1
svy: reg anx_hlt1_w3 anx_hlt1_w2 hltnewsneg_w2 hltnewspos_w2 ///
	i.pid3lr i.racer i.agecatr i.femaler i.colg4r c.faminc_new_w3r c.ideo5r c.newsintr ///
	i.q159_w3r i.q160_w3r newcov1_w3 newdieall_w3 cases_curr_pthou_w3  
outreg2 using "apptable30.xls", stats(coef se pval) bracket(se) paren(pval) label replace dec(3)

**Replicate supplementary table 30 column 2
svy: reg hltnewsneg_w3 anx_hlt1_w2 hltnewsneg_w2 hltnewspos_w2 ///
	i.pid3lr i.racer i.agecatr i.femaler i.colg4r c.faminc_new_w3r c.ideo5r c.newsintr ///
	i.q159_w3r i.q160_w3r newcov1_w3 newdieall_w3 cases_curr_pthou_w3  
outreg2 using "apptable30.xls", stats(coef se pval) bracket(se) paren(pval) label append dec(3)

**Replicate supplementary table 30 column 3
svy: reg hltnewspos_w3 anx_hlt1_w2 hltnewsneg_w2 hltnewspos_w2 ///
	i.pid3lr i.racer i.agecatr i.femaler i.colg4r c.faminc_new_w3r c.ideo5r c.newsintr ///
	i.q159_w3r i.q160_w3r newcov1_w3 newdieall_w3 cases_curr_pthou_w3  
outreg2 using "apptable30.xls", stats(coef se pval) bracket(se) paren(pval) label append dec(3)

**Replicate supplementary table 31 column 1
svy: reg anx_eco1_w3 anx_eco1_w2 econewsneg_w2 econewspos_w2 ///
	i.pid3lr i.racer i.agecatr i.femaler i.colg4r c.faminc_new_w3r c.ideo5r c.newsintr ///
	i.q159_w3r i.q160_w3r newpay_w3 newjobhh_w3 ur_w3  
outreg2 using "apptable31.xls", stats(coef se pval) bracket(se) paren(pval) label replace dec(3)

**Replicate supplementary table 31 column 2
svy: reg econewsneg_w3 anx_eco1_w2 econewsneg_w2 econewspos_w2 ///
	i.pid3lr i.racer i.agecatr i.femaler i.colg4r c.faminc_new_w3r c.ideo5r c.newsintr ///
	i.q159_w3r i.q160_w3r newpay_w3 newjobhh_w3 ur_w3  
outreg2 using "apptable31.xls", stats(coef se pval) bracket(se) paren(pval) label append dec(3)

**Replicate supplementary table 31 column 3
svy: reg econewspos_w3 anx_eco1_w2 econewsneg_w2 econewspos_w2 ///
	i.pid3lr i.racer i.agecatr i.femaler i.colg4r c.faminc_new_w3r c.ideo5r c.newsintr ///
	i.q159_w3r i.q160_w3r newpay_w3 newjobhh_w3 ur_w3  
outreg2 using "apptable31.xls", stats(coef se pval) bracket(se) paren(pval) label append dec(3)

svyset [pweight=weight_w4]
**Replicate supplementary table 30 column 4
svy: reg anx_hlt1_w4 anx_hlt1_w3 hltnewsneg_w3 hltnewspos_w3 ///
	i.pid3lr i.racer i.agecatr i.femaler i.colg4r c.faminc_new_w4r c.ideo5r c.newsintr ///
	i.q159_w4r i.q160_w4r newcov1_w4 newdieall_w4 cases_curr_pthou_w4  
outreg2 using "apptable30.xls", stats(coef se pval) bracket(se) paren(pval) label append dec(3)

**Replicate supplementary table 30 column 5
svy: reg hltnewsneg_w4 anx_hlt1_w3 hltnewsneg_w3 hltnewspos_w3 ///
	i.pid3lr i.racer i.agecatr i.femaler i.colg4r c.faminc_new_w4r c.ideo5r c.newsintr ///
	i.q159_w4r i.q160_w4r newcov1_w4 newdieall_w4 cases_curr_pthou_w4  
outreg2 using "apptable30.xls", stats(coef se pval) bracket(se) paren(pval) label append dec(3)

**Replicate supplementary table 30 column 6
svy: reg hltnewspos_w4 anx_hlt1_w3 hltnewsneg_w3 hltnewspos_w3 ///
	i.pid3lr i.racer i.agecatr i.femaler i.colg4r c.faminc_new_w4r c.ideo5r c.newsintr ///
	i.q159_w4r i.q160_w4r newcov1_w4 newdieall_w4 cases_curr_pthou_w4  
outreg2 using "apptable30.xls", stats(coef se pval) bracket(se) paren(pval) label append dec(3)
	
**Replicate supplementary table 31 column 4
svy: reg anx_eco1_w4 anx_eco1_w3 econewsneg_w3 econewspos_w3 ///
	i.pid3lr i.racer i.agecatr i.femaler i.colg4r c.faminc_new_w4r c.ideo5r c.newsintr ///
	i.q159_w4r i.q160_w4r newpay_w4 newjobhh_w4 ur_w4  
outreg2 using "apptable31.xls", stats(coef se pval) bracket(se) paren(pval) label append dec(3)

**Replicate supplementary table 31 column 5
svy: reg econewsneg_w4 anx_eco1_w3 econewsneg_w3 econewspos_w3 ///
	i.pid3lr i.racer i.agecatr i.femaler i.colg4r c.faminc_new_w4r c.ideo5r c.newsintr ///
	i.q159_w4r i.q160_w4r newpay_w4 newjobhh_w4 ur_w4  
outreg2 using "apptable31.xls", stats(coef se pval) bracket(se) paren(pval) label append dec(3)

**Replicate supplementary table 31 column 6
svy: reg econewspos_w4 anx_eco1_w3 econewsneg_w3 econewspos_w3 ///
	i.pid3lr i.racer i.agecatr i.femaler i.colg4r c.faminc_new_w4r c.ideo5r c.newsintr ///
	i.q159_w4r i.q160_w4r newpay_w4 newjobhh_w4 ur_w4  
outreg2 using "apptable31.xls", stats(coef se pval) bracket(se) paren(pval) label append dec(3)
	
********************************************************************************
* REPLICATE TABLE 5 COLUMNS 1-4 & SUPPLEMENTARY TABLES 6-27
********************************************************************************

**Replicate table 5 row 1 column 1-2 and supplemtary table 6 column 1
reg q107_w4r anx_hlt1_w4 anx_eco1_w4 i.pid3lr i.racer i.agecatr i.femaler i.colg4r c.faminc_new_w4r c.ideo5r c.newsintr i.q159_w4r i.q160_w4r [pweight=weight_w4] 
outreg2 using "apptable6.xls", stats(coef se pval) bracket(se) paren(pval) label replace dec(3)

**Replicate supplemtary table 6 column 2
reg q107_w5r anx_hlt1_w4 anx_eco1_w4 i.pid3lr i.racer i.agecatr i.femaler i.colg4r c.faminc_new_w4r c.ideo5r c.newsintr i.q159_w4r i.q160_w4r [pweight=weight_w4] 
outreg2 using "apptable6.xls", stats(coef se pval) bracket(se) paren(pval) label append dec(3)

**Replicate table 5 row 1 column 3-4 and supplemtary table 6 column 3
reg q107_w5r anx_hlt1_w4 anx_eco1_w4 anx_hlt1_w5 anx_eco1_w5 i.pid3lr i.racer i.agecatr i.femaler i.colg4r c.faminc_new_w4r c.ideo5r c.newsintr i.q159_w4r i.q160_w4r [pweight=weight_w4] 
outreg2 using "apptable6.xls", stats(coef se pval) bracket(se) paren(pval) label append dec(3)

**Replicate table 5 row 2 column 1-2 and supplemtary table 7 column 1
reg q108_w4r anx_hlt1_w4 anx_eco1_w4 i.pid3lr i.racer i.agecatr i.femaler i.colg4r c.faminc_new_w4r c.ideo5r c.newsintr i.q159_w4r i.q160_w4r [pweight=weight_w4] 
outreg2 using "apptable7.xls", stats(coef se pval) bracket(se) paren(pval) label replace dec(3)

**Replicate supplemtary table 7 column 2
reg q108_w5r anx_hlt1_w4 anx_eco1_w4 i.pid3lr i.racer i.agecatr i.femaler i.colg4r c.faminc_new_w4r c.ideo5r c.newsintr i.q159_w4r i.q160_w4r [pweight=weight_w4] 
outreg2 using "apptable7.xls", stats(coef se pval) bracket(se) paren(pval) label append dec(3)

**Replicate table 5 row 2 column 3-4 and supplemtary table 7 column 3
reg q108_w5r anx_hlt1_w4 anx_eco1_w4 anx_hlt1_w5 anx_eco1_w5 i.pid3lr i.racer i.agecatr i.femaler i.colg4r c.faminc_new_w4r c.ideo5r c.newsintr i.q159_w4r i.q160_w4r [pweight=weight_w4] 
outreg2 using "apptable7.xls", stats(coef se pval) bracket(se) paren(pval) label append dec(3)

**Replicate table 5 row 3 column 1-2 and supplemtary table 8 column 1
reg q109_w4r anx_hlt1_w4 anx_eco1_w4 i.pid3lr i.racer i.agecatr i.femaler i.colg4r c.faminc_new_w4r c.ideo5r c.newsintr i.q159_w4r i.q160_w4r [pweight=weight_w4] 
outreg2 using "apptable8.xls", stats(coef se pval) bracket(se) paren(pval) label replace dec(3)

**Replicate supplemtary table 8 column 2
reg q109_w5r anx_hlt1_w4 anx_eco1_w4 i.pid3lr i.racer i.agecatr i.femaler i.colg4r c.faminc_new_w4r c.ideo5r c.newsintr i.q159_w4r i.q160_w4r [pweight=weight_w4] 
outreg2 using "apptable8.xls", stats(coef se pval) bracket(se) paren(pval) label append dec(3)

**Replicate table 5 row 3 column 3-4 and supplemtary table 8 column 3
reg q109_w5r anx_hlt1_w4 anx_eco1_w4 anx_hlt1_w5 anx_eco1_w5 i.pid3lr i.racer i.agecatr i.femaler i.colg4r c.faminc_new_w4r c.ideo5r c.newsintr i.q159_w4r i.q160_w4r [pweight=weight_w4] 
outreg2 using "apptable8.xls", stats(coef se pval) bracket(se) paren(pval) label append dec(3)

**Replicate table 5 row 4 column 1-2 and supplemtary table 9 column 1
reg q110_w4r anx_hlt1_w4 anx_eco1_w4 i.pid3lr i.racer i.agecatr i.femaler i.colg4r c.faminc_new_w4r c.ideo5r c.newsintr i.q159_w4r i.q160_w4r [pweight=weight_w4] 
outreg2 using "apptable9.xls", stats(coef se pval) bracket(se) paren(pval) label replace dec(3)

**Replicate supplemtary table 9 column 2
reg q110_w5r anx_hlt1_w4 anx_eco1_w4 i.pid3lr i.racer i.agecatr i.femaler i.colg4r c.faminc_new_w4r c.ideo5r c.newsintr i.q159_w4r i.q160_w4r [pweight=weight_w4] 
outreg2 using "apptable9.xls", stats(coef se pval) bracket(se) paren(pval) label append dec(3)

**Replicate table 5 row 4 column 3-4 and supplemtary table 9 column 3
reg q110_w5r anx_hlt1_w4 anx_eco1_w4 anx_hlt1_w5 anx_eco1_w5 i.pid3lr i.racer i.agecatr i.femaler i.colg4r c.faminc_new_w4r c.ideo5r c.newsintr i.q159_w4r i.q160_w4r [pweight=weight_w4] 
outreg2 using "apptable9.xls", stats(coef se pval) bracket(se) paren(pval) label append dec(3)

**Replicate table 5 row 5 column 1-2 and supplemtary table 10 column 1
reg q111_w4r anx_hlt1_w4 anx_eco1_w4 i.pid3lr i.racer i.agecatr i.femaler i.colg4r c.faminc_new_w4r c.ideo5r c.newsintr i.q159_w4r i.q160_w4r [pweight=weight_w4] 
outreg2 using "apptable10.xls", stats(coef se pval) bracket(se) paren(pval) label replace dec(3)

**Replicate supplemtary table 10 column 2
reg q111_w5r anx_hlt1_w4 anx_eco1_w4 i.pid3lr i.racer i.agecatr i.femaler i.colg4r c.faminc_new_w4r c.ideo5r c.newsintr i.q159_w4r i.q160_w4r [pweight=weight_w4] 
outreg2 using "apptable10.xls", stats(coef se pval) bracket(se) paren(pval) label append dec(3)

**Replicate table 5 row 5 column 3-4 and supplemtary table 10 column 3
reg q111_w5r anx_hlt1_w4 anx_eco1_w4 anx_hlt1_w5 anx_eco1_w5 i.pid3lr i.racer i.agecatr i.femaler i.colg4r c.faminc_new_w4r c.ideo5r c.newsintr i.q159_w4r i.q160_w4r [pweight=weight_w4] 
outreg2 using "apptable10.xls", stats(coef se pval) bracket(se) paren(pval) label append dec(3)

**Replicate table 5 row 6 column 1-2 and supplemtary table 11 column 1
reg q201_w4r anx_hlt1_w4 anx_eco1_w4 i.pid3lr i.racer i.agecatr i.femaler i.colg4r c.faminc_new_w4r c.ideo5r c.newsintr i.q159_w4r i.q160_w4r [pweight=weight_w4] 
outreg2 using "apptable11.xls", stats(coef se pval) bracket(se) paren(pval) label replace dec(3)

**Replicate supplemtary table 11 column 2
reg q201_w5r anx_hlt1_w4 anx_eco1_w4 i.pid3lr i.racer i.agecatr i.femaler i.colg4r c.faminc_new_w4r c.ideo5r c.newsintr i.q159_w4r i.q160_w4r [pweight=weight_w4] 
outreg2 using "apptable11.xls", stats(coef se pval) bracket(se) paren(pval) label append dec(3)

**Replicate table 5 row 6 column 3-4 and supplemtary table 11 column 3
reg q201_w5r anx_hlt1_w4 anx_eco1_w4 anx_hlt1_w5 anx_eco1_w5 i.pid3lr i.racer i.agecatr i.femaler i.colg4r c.faminc_new_w4r c.ideo5r c.newsintr i.q159_w4r i.q160_w4r [pweight=weight_w4] 
outreg2 using "apptable11.xls", stats(coef se pval) bracket(se) paren(pval) label append dec(3)

**Replicate supplemtary table 12 column 1
reg q94_w4r anx_hlt1_w4 anx_eco1_w4 i.pid3lr i.racer i.agecatr i.femaler i.colg4r c.faminc_new_w4r c.ideo5r c.newsintr i.q159_w4r i.q160_w4r [pweight=weight_w4] 
outreg2 using "apptable12.xls", stats(coef se pval) bracket(se) paren(pval) label replace dec(3)

**Replicate supplemtary table 12 column 2
reg q94_w5r anx_hlt1_w4 anx_eco1_w4 i.pid3lr i.racer i.agecatr i.femaler i.colg4r c.faminc_new_w4r c.ideo5r c.newsintr i.q159_w4r i.q160_w4r [pweight=weight_w4] 
outreg2 using "apptable12.xls", stats(coef se pval) bracket(se) paren(pval) label append dec(3)

**Replicate supplemtary table 12 column 3
reg q94_w5r anx_hlt1_w4 anx_eco1_w4 anx_hlt1_w5 anx_eco1_w5 i.pid3lr i.racer i.agecatr i.femaler i.colg4r c.faminc_new_w4r c.ideo5r c.newsintr i.q159_w4r i.q160_w4r [pweight=weight_w4] 
outreg2 using "apptable12.xls", stats(coef se pval) bracket(se) paren(pval) label append dec(3)

**Replicate supplemtary table 13 column 1
reg q95_w4r anx_hlt1_w4 anx_eco1_w4 i.pid3lr i.racer i.agecatr i.femaler i.colg4r c.faminc_new_w4r c.ideo5r c.newsintr i.q159_w4r i.q160_w4r [pweight=weight_w4] 
outreg2 using "apptable13.xls", stats(coef se pval) bracket(se) paren(pval) label replace dec(3)

**Replicate supplemtary table 13 column 2
reg q95_w5r anx_hlt1_w4 anx_eco1_w4 i.pid3lr i.racer i.agecatr i.femaler i.colg4r c.faminc_new_w4r c.ideo5r c.newsintr i.q159_w4r i.q160_w4r [pweight=weight_w4] 
outreg2 using "apptable13.xls", stats(coef se pval) bracket(se) paren(pval) label append dec(3)

**Replicate supplemtary table 13 column 3
reg q95_w5r anx_hlt1_w4 anx_eco1_w4 anx_hlt1_w5 anx_eco1_w5 i.pid3lr i.racer i.agecatr i.femaler i.colg4r c.faminc_new_w4r c.ideo5r c.newsintr i.q159_w4r i.q160_w4r [pweight=weight_w4] 
outreg2 using "apptable13.xls", stats(coef se pval) bracket(se) paren(pval) label append dec(3)

**Replicate supplemtary table 14 column 1
reg q96_w4r anx_hlt1_w4 anx_eco1_w4 i.pid3lr i.racer i.agecatr i.femaler i.colg4r c.faminc_new_w4r c.ideo5r c.newsintr i.q159_w4r i.q160_w4r [pweight=weight_w4] 
outreg2 using "apptable14.xls", stats(coef se pval) bracket(se) paren(pval) label replace dec(3)

**Replicate supplemtary table 14 column 2
reg q96_w5r anx_hlt1_w4 anx_eco1_w4 i.pid3lr i.racer i.agecatr i.femaler i.colg4r c.faminc_new_w4r c.ideo5r c.newsintr i.q159_w4r i.q160_w4r [pweight=weight_w4] 
outreg2 using "apptable14.xls", stats(coef se pval) bracket(se) paren(pval) label append dec(3)

**Replicate supplemtary table 14 column 3
reg q96_w5r anx_hlt1_w4 anx_eco1_w4 anx_hlt1_w5 anx_eco1_w5 i.pid3lr i.racer i.agecatr i.femaler i.colg4r c.faminc_new_w4r c.ideo5r c.newsintr i.q159_w4r i.q160_w4r [pweight=weight_w4] 
outreg2 using "apptable14.xls", stats(coef se pval) bracket(se) paren(pval) label append dec(3)

**Replicate supplemtary table 15 column 1
reg q97_w4r anx_hlt1_w4 anx_eco1_w4 i.pid3lr i.racer i.agecatr i.femaler i.colg4r c.faminc_new_w4r c.ideo5r c.newsintr i.q159_w4r i.q160_w4r [pweight=weight_w4] 
outreg2 using "apptable15.xls", stats(coef se pval) bracket(se) paren(pval) label replace dec(3)

**Replicate supplemtary table 15 column 2
reg q97_w5r anx_hlt1_w4 anx_eco1_w4 i.pid3lr i.racer i.agecatr i.femaler i.colg4r c.faminc_new_w4r c.ideo5r c.newsintr i.q159_w4r i.q160_w4r [pweight=weight_w4] 
outreg2 using "apptable15.xls", stats(coef se pval) bracket(se) paren(pval) label append dec(3)

**Replicate supplemtary table 15 column 3
reg q97_w5r anx_hlt1_w4 anx_eco1_w4 anx_hlt1_w5 anx_eco1_w5 i.pid3lr i.racer i.agecatr i.femaler i.colg4r c.faminc_new_w4r c.ideo5r c.newsintr i.q159_w4r i.q160_w4r [pweight=weight_w4] 
outreg2 using "apptable15.xls", stats(coef se pval) bracket(se) paren(pval) label append dec(3)

**Replicate supplemtary table 16 column 1
reg q98_w4r anx_hlt1_w4 anx_eco1_w4 i.pid3lr i.racer i.agecatr i.femaler i.colg4r c.faminc_new_w4r c.ideo5r c.newsintr i.q159_w4r i.q160_w4r [pweight=weight_w4] 
outreg2 using "apptable16.xls", stats(coef se pval) bracket(se) paren(pval) label replace dec(3)

**Replicate supplemtary table 16 column 2
reg q98_w5r anx_hlt1_w4 anx_eco1_w4 i.pid3lr i.racer i.agecatr i.femaler i.colg4r c.faminc_new_w4r c.ideo5r c.newsintr i.q159_w4r i.q160_w4r [pweight=weight_w4] 
outreg2 using "apptable16.xls", stats(coef se pval) bracket(se) paren(pval) label append dec(3)

**Replicate supplemtary table 16 column 3
reg q98_w5r anx_hlt1_w4 anx_eco1_w4 anx_hlt1_w5 anx_eco1_w5 i.pid3lr i.racer i.agecatr i.femaler i.colg4r c.faminc_new_w4r c.ideo5r c.newsintr i.q159_w4r i.q160_w4r [pweight=weight_w4] 
outreg2 using "apptable16.xls", stats(coef se pval) bracket(se) paren(pval) label append dec(3)

**Replicate supplemtary table 17 column 1
reg q99_w4r anx_hlt1_w4 anx_eco1_w4 i.pid3lr i.racer i.agecatr i.femaler i.colg4r c.faminc_new_w4r c.ideo5r c.newsintr i.q159_w4r i.q160_w4r [pweight=weight_w4] 
outreg2 using "apptable17.xls", stats(coef se pval) bracket(se) paren(pval) label replace dec(3)

**Replicate supplemtary table 17 column 2
reg q99_w5r anx_hlt1_w4 anx_eco1_w4 i.pid3lr i.racer i.agecatr i.femaler i.colg4r c.faminc_new_w4r c.ideo5r c.newsintr i.q159_w4r i.q160_w4r [pweight=weight_w4] 
outreg2 using "apptable17.xls", stats(coef se pval) bracket(se) paren(pval) label append dec(3)

**Replicate supplemtary table 17 column 3
reg q99_w5r anx_hlt1_w4 anx_eco1_w4 anx_hlt1_w5 anx_eco1_w5 i.pid3lr i.racer i.agecatr i.femaler i.colg4r c.faminc_new_w4r c.ideo5r c.newsintr i.q159_w4r i.q160_w4r [pweight=weight_w4] 
outreg2 using "apptable17.xls", stats(coef se pval) bracket(se) paren(pval) label append dec(3)

**Replicate supplemtary table 18 column 1
reg q100_w4r anx_hlt1_w4 anx_eco1_w4 i.pid3lr i.racer i.agecatr i.femaler i.colg4r c.faminc_new_w4r c.ideo5r c.newsintr i.q159_w4r i.q160_w4r [pweight=weight_w4] 
outreg2 using "apptable18.xls", stats(coef se pval) bracket(se) paren(pval) label replace dec(3)

**Replicate supplemtary table 18 column 2
reg q100_w5r anx_hlt1_w4 anx_eco1_w4 i.pid3lr i.racer i.agecatr i.femaler i.colg4r c.faminc_new_w4r c.ideo5r c.newsintr i.q159_w4r i.q160_w4r [pweight=weight_w4] 
outreg2 using "apptable18.xls", stats(coef se pval) bracket(se) paren(pval) label append dec(3)

**Replicate supplemtary table 18 column 3
reg q100_w5r anx_hlt1_w4 anx_eco1_w4 anx_hlt1_w5 anx_eco1_w5 i.pid3lr i.racer i.agecatr i.femaler i.colg4r c.faminc_new_w4r c.ideo5r c.newsintr i.q159_w4r i.q160_w4r [pweight=weight_w4] 
outreg2 using "apptable18.xls", stats(coef se pval) bracket(se) paren(pval) label append dec(3)

**Replicate supplemtary table 19 column 1
reg q101_w4r anx_hlt1_w4 anx_eco1_w4 i.pid3lr i.racer i.agecatr i.femaler i.colg4r c.faminc_new_w4r c.ideo5r c.newsintr i.q159_w4r i.q160_w4r [pweight=weight_w4] 
outreg2 using "apptable19.xls", stats(coef se pval) bracket(se) paren(pval) label replace dec(3)

**Replicate supplemtary table 19 column 2
reg q101_w5r anx_hlt1_w4 anx_eco1_w4 i.pid3lr i.racer i.agecatr i.femaler i.colg4r c.faminc_new_w4r c.ideo5r c.newsintr i.q159_w4r i.q160_w4r [pweight=weight_w4] 
outreg2 using "apptable19.xls", stats(coef se pval) bracket(se) paren(pval) label append dec(3)

**Replicate supplemtary table 19 column 3
reg q101_w5r anx_hlt1_w4 anx_eco1_w4 anx_hlt1_w5 anx_eco1_w5 i.pid3lr i.racer i.agecatr i.femaler i.colg4r c.faminc_new_w4r c.ideo5r c.newsintr i.q159_w4r i.q160_w4r [pweight=weight_w4] 
outreg2 using "apptable19.xls", stats(coef se pval) bracket(se) paren(pval) label append dec(3)

**Replicate supplemtary table 20 column 1
reg q102_w4r anx_hlt1_w4 anx_eco1_w4 i.pid3lr i.racer i.agecatr i.femaler i.colg4r c.faminc_new_w4r c.ideo5r c.newsintr i.q159_w4r i.q160_w4r [pweight=weight_w4] 
outreg2 using "apptable20.xls", stats(coef se pval) bracket(se) paren(pval) label replace dec(3)

**Replicate supplemtary table 20 column 2
reg q102_w5r anx_hlt1_w4 anx_eco1_w4 i.pid3lr i.racer i.agecatr i.femaler i.colg4r c.faminc_new_w4r c.ideo5r c.newsintr i.q159_w4r i.q160_w4r [pweight=weight_w4] 
outreg2 using "apptable20.xls", stats(coef se pval) bracket(se) paren(pval) label append dec(3)

**Replicate supplemtary table 20 column 3
reg q102_w5r anx_hlt1_w4 anx_eco1_w4 anx_hlt1_w5 anx_eco1_w5 i.pid3lr i.racer i.agecatr i.femaler i.colg4r c.faminc_new_w4r c.ideo5r c.newsintr i.q159_w4r i.q160_w4r [pweight=weight_w4] 
outreg2 using "apptable20.xls", stats(coef se pval) bracket(se) paren(pval) label append dec(3)

**Replicate supplemtary table 21 column 1
reg q103_w4r anx_hlt1_w4 anx_eco1_w4 i.pid3lr i.racer i.agecatr i.femaler i.colg4r c.faminc_new_w4r c.ideo5r c.newsintr i.q159_w4r i.q160_w4r [pweight=weight_w4] 
outreg2 using "apptable21.xls", stats(coef se pval) bracket(se) paren(pval) label replace dec(3)

**Replicate supplemtary table 21 column 2
reg q103_w5r anx_hlt1_w4 anx_eco1_w4 i.pid3lr i.racer i.agecatr i.femaler i.colg4r c.faminc_new_w4r c.ideo5r c.newsintr i.q159_w4r i.q160_w4r [pweight=weight_w4] 
outreg2 using "apptable21.xls", stats(coef se pval) bracket(se) paren(pval) label append dec(3)

**Replicate supplemtary table 21 column 3
reg q103_w5r anx_hlt1_w4 anx_eco1_w4 anx_hlt1_w5 anx_eco1_w5 i.pid3lr i.racer i.agecatr i.femaler i.colg4r c.faminc_new_w4r c.ideo5r c.newsintr i.q159_w4r i.q160_w4r [pweight=weight_w4] 
outreg2 using "apptable21.xls", stats(coef se pval) bracket(se) paren(pval) label append dec(3)

**Replicate supplemtary table 22 column 1
reg q202_w4r anx_hlt1_w4 anx_eco1_w4 i.pid3lr i.racer i.agecatr i.femaler i.colg4r c.faminc_new_w4r c.ideo5r c.newsintr i.q159_w4r i.q160_w4r [pweight=weight_w4] 
outreg2 using "apptable22.xls", stats(coef se pval) bracket(se) paren(pval) label replace dec(3)

**Replicate supplemtary table 22 column 2
reg q202_w5r anx_hlt1_w4 anx_eco1_w4 i.pid3lr i.racer i.agecatr i.femaler i.colg4r c.faminc_new_w4r c.ideo5r c.newsintr i.q159_w4r i.q160_w4r [pweight=weight_w4] 
outreg2 using "apptable22.xls", stats(coef se pval) bracket(se) paren(pval) label append dec(3)

**Replicate supplemtary table 22 column 3
reg q202_w5r anx_hlt1_w4 anx_eco1_w4 anx_hlt1_w5 anx_eco1_w5 i.pid3lr i.racer i.agecatr i.femaler i.colg4r c.faminc_new_w4r c.ideo5r c.newsintr i.q159_w4r i.q160_w4r [pweight=weight_w4] 
outreg2 using "apptable22.xls", stats(coef se pval) bracket(se) paren(pval) label append dec(3)

**Replicate supplemtary table 23 column 1
reg q203a_w4r anx_hlt1_w4 anx_eco1_w4 i.pid3lr i.racer i.agecatr i.femaler i.colg4r c.faminc_new_w4r c.ideo5r c.newsintr i.q159_w4r i.q160_w4r [pweight=weight_w4] 
outreg2 using "apptable23.xls", stats(coef se pval) bracket(se) paren(pval) label replace dec(3)

**Replicate supplemtary table 23 column 2
reg q203a_w5r anx_hlt1_w4 anx_eco1_w4 i.pid3lr i.racer i.agecatr i.femaler i.colg4r c.faminc_new_w4r c.ideo5r c.newsintr i.q159_w4r i.q160_w4r [pweight=weight_w4] 
outreg2 using "apptable23.xls", stats(coef se pval) bracket(se) paren(pval) label append dec(3)

**Replicate supplemtary table 23 column 3
reg q203a_w5r anx_hlt1_w4 anx_eco1_w4 anx_hlt1_w5 anx_eco1_w5 i.pid3lr i.racer i.agecatr i.femaler i.colg4r c.faminc_new_w4r c.ideo5r c.newsintr i.q159_w4r i.q160_w4r [pweight=weight_w4] 
outreg2 using "apptable23.xls", stats(coef se pval) bracket(se) paren(pval) label append dec(3)

**Replicate supplemtary table 24 column 1
reg q203b_w4r anx_hlt1_w4 anx_eco1_w4 i.pid3lr i.racer i.agecatr i.femaler i.colg4r c.faminc_new_w4r c.ideo5r c.newsintr i.q159_w4r i.q160_w4r [pweight=weight_w4] 
outreg2 using "apptable24.xls", stats(coef se pval) bracket(se) paren(pval) label replace dec(3)

**Replicate supplemtary table 24 column 2
reg q203b_w5r anx_hlt1_w4 anx_eco1_w4 i.pid3lr i.racer i.agecatr i.femaler i.colg4r c.faminc_new_w4r c.ideo5r c.newsintr i.q159_w4r i.q160_w4r [pweight=weight_w4] 
outreg2 using "apptable24.xls", stats(coef se pval) bracket(se) paren(pval) label append dec(3)

**Replicate supplemtary table 24 column 3
reg q203b_w5r anx_hlt1_w4 anx_eco1_w4 anx_hlt1_w5 anx_eco1_w5 i.pid3lr i.racer i.agecatr i.femaler i.colg4r c.faminc_new_w4r c.ideo5r c.newsintr i.q159_w4r i.q160_w4r [pweight=weight_w4] 
outreg2 using "apptable24.xls", stats(coef se pval) bracket(se) paren(pval) label append dec(3)

**Replicate table 5 row 9 column 1-2 and supplemtary table 25 column 1
reg allpol_w4r anx_hlt1_w4 anx_eco1_w4 i.pid3lr i.racer i.agecatr i.femaler i.colg4r c.faminc_new_w4r c.ideo5r c.newsintr i.q159_w4r i.q160_w4r [pweight=weight_w4] 
outreg2 using "apptable25.xls", stats(coef se pval) bracket(se) paren(pval) label replace dec(3)

**Replicate supplemtary table 25 column 2
reg allpol_w5r anx_hlt1_w4 anx_eco1_w4 i.pid3lr i.racer i.agecatr i.femaler i.colg4r c.faminc_new_w4r c.ideo5r c.newsintr i.q159_w4r i.q160_w4r [pweight=weight_w4] 
outreg2 using "apptable25.xls", stats(coef se pval) bracket(se) paren(pval) label append dec(3)

**Replicate table 5 row 9 column 3-4 and supplemtary table 25 column 3
reg allpol_w5r anx_hlt1_w4 anx_eco1_w4 anx_hlt1_w5 anx_eco1_w5 i.pid3lr i.racer i.agecatr i.femaler i.colg4r c.faminc_new_w4r c.ideo5r c.newsintr i.q159_w4r i.q160_w4r [pweight=weight_w4] 
outreg2 using "apptable25.xls", stats(coef se pval) bracket(se) paren(pval) label append dec(3)

**Replicate table 5 row 7 column 1-2 and supplemtary table 26 column 1
reg hltpol2_w4r anx_hlt1_w4 anx_eco1_w4 i.pid3lr i.racer i.agecatr i.femaler i.colg4r c.faminc_new_w4r c.ideo5r c.newsintr i.q159_w4r i.q160_w4r [pweight=weight_w4] 
outreg2 using "apptable26.xls", stats(coef se pval) bracket(se) paren(pval) label replace dec(3)

**Replicate supplemtary table 26 column 2
reg hltpol2_w5r anx_hlt1_w4 anx_eco1_w4 i.pid3lr i.racer i.agecatr i.femaler i.colg4r c.faminc_new_w4r c.ideo5r c.newsintr i.q159_w4r i.q160_w4r [pweight=weight_w4] 
outreg2 using "apptable26.xls", stats(coef se pval) bracket(se) paren(pval) label append dec(3)

**Replicate table 5 row 7 column 3-4 and supplemtary table 26 column 3
reg hltpol2_w5r anx_hlt1_w4 anx_eco1_w4 anx_hlt1_w5 anx_eco1_w5 i.pid3lr i.racer i.agecatr i.femaler i.colg4r c.faminc_new_w4r c.ideo5r c.newsintr i.q159_w4r i.q160_w4r [pweight=weight_w4] 
outreg2 using "apptable26.xls", stats(coef se pval) bracket(se) paren(pval) label append dec(3)

**Replicate table 5 row 8 column 1-2 and supplemtary table 27 column 1
reg ecpol_w4r anx_hlt1_w4 anx_eco1_w4 i.pid3lr i.racer i.agecatr i.femaler i.colg4r c.faminc_new_w4r c.ideo5r c.newsintr i.q159_w4r i.q160_w4r [pweight=weight_w4] 
outreg2 using "apptable27.xls", stats(coef se pval) bracket(se) paren(pval) label replace dec(3)

**Replicate supplemtary table 27 column 2
reg ecpol_w5r anx_hlt1_w4 anx_eco1_w4 i.pid3lr i.racer i.agecatr i.femaler i.colg4r c.faminc_new_w4r c.ideo5r c.newsintr i.q159_w4r i.q160_w4r [pweight=weight_w4] 
outreg2 using "apptable27.xls", stats(coef se pval) bracket(se) paren(pval) label append dec(3)

**Replicate table 5 row 8 column 3-4 and supplemtary table 27 column 3
reg ecpol_w5r anx_hlt1_w4 anx_eco1_w4 anx_hlt1_w5 anx_eco1_w5 i.pid3lr i.racer i.agecatr i.femaler i.colg4r c.faminc_new_w4r c.ideo5r c.newsintr i.q159_w4r i.q160_w4r [pweight=weight_w4] 
outreg2 using "apptable27.xls", stats(coef se pval) bracket(se) paren(pval) label append dec(3)

********************************************************************************
*REPLICATE SUPPLEMNTARY TABLES 28 & 29
********************************************************************************

gen stayer = 0
replace stayer = 1 if whichwaves == 1 | whichwaves == 17 | whichwaves == 25 | whichwaves == 29 | whichwaves == 31

gen leaver = 0
replace leaver = 1 if whichwaves == 2 | whichwaves == 4 | whichwaves == 8 | whichwaves == 16 | whichwaves == 18 | whichwaves == 20 | whichwaves == 24 | whichwaves == 26 | whichwaves == 28 | whichwaves == 30

svyset [pweight=weight_w1]
**Replicate supplemntary table 28 row 1 column 1
svy: logit present_w2 anx_hlt1_w1 i.pid3lr i.racer i.agecatr i.femaler i.colg4r c.faminc_new_w1r c.ideo5r c.newsintr i.q159_w1r i.q160_w1r if present_w1 == 1
margins, dydx(*) 

**Replicate supplemntary table 28 row 1 column 2
svy: logit present_w2 anx_eco1_w1 i.pid3lr i.racer i.agecatr i.femaler i.colg4r c.faminc_new_w1r c.ideo5r c.newsintr i.q159_w1r i.q160_w1r if present_w1 == 1
margins, dydx(*) 

svyset [pweight=weight_w2]
**Replicate supplemntary table 28 row 2 column 1
svy: logit present_w3 anx_hlt1_w2 i.pid3lr i.racer i.agecatr i.femaler i.colg4r c.faminc_new_w2r c.ideo5r c.newsintr i.q159_w2r i.q160_w2r if present_w2 == 1
margins, dydx(*) 

**Replicate supplemntary table 28 row 2 column 2
svy: logit present_w3 anx_eco1_w2 i.pid3lr i.racer i.agecatr i.femaler i.colg4r c.faminc_new_w2r c.ideo5r c.newsintr i.q159_w2r i.q160_w2r if present_w2 == 1
margins, dydx(*) 

svyset [pweight=weight_w3]
**Replicate supplemntary table 28 row 3 column 1
svy: logit present_w4 anx_hlt1_w3 i.pid3lr i.racer i.agecatr i.femaler i.colg4r c.faminc_new_w3r c.ideo5r c.newsintr i.q159_w3r i.q160_w3r if present_w3 == 1
margins, dydx(*) 

**Replicate supplemntary table 28 row 3 column 2
svy: logit present_w4 anx_eco1_w3 i.pid3lr i.racer i.agecatr i.femaler i.colg4r c.faminc_new_w3r c.ideo5r c.newsintr i.q159_w3r i.q160_w3r if present_w3 == 1
margins, dydx(*) 

svyset [pweight=weight_w4]
**Replicate supplemntary table 28 row 4 column 1
svy: logit present_w5 anx_hlt1_w4 i.pid3lr i.racer i.agecatr i.femaler i.colg4r c.faminc_new_w4r c.ideo5r c.newsintr i.q159_w4r i.q160_w4r if present_w4 == 1
margins, dydx(*)

**Replicate supplemntary table 28 row 4 column 2
svy: logit present_w5 anx_eco1_w4 i.pid3lr i.racer i.agecatr i.femaler i.colg4r c.faminc_new_w4r c.ideo5r c.newsintr i.q159_w4r i.q160_w4r if present_w4 == 1
margins, dydx(*) 

svyset [pweight=weight_w2]
**Replicate supplemntary table 29 row 1 column 1
svy: mean anx_hlt1_w2 if leaver == 0 & present_w1 == 1
**Replicate supplemntary table 29 row 1 column 2
svy: mean anx_hlt1_w2 if leaver == 0 & present_w1 == 0
**Replicate supplemntary table 29 row 1 column 3
svy: mean anx_eco1_w2 if leaver == 0 & present_w1 == 1
**Replicate supplemntary table 29 row 1 column 4
svy: mean anx_eco1_w2 if leaver == 0 & present_w1 == 0

svyset [pweight=weight_w3]
**Replicate supplemntary table 29 row 2 column 1
svy: mean anx_hlt1_w3 if stayer == 1 & (present_w2 == 1 | present_w1 == 1)
**Replicate supplemntary table 29 row 2 column 2
svy: mean anx_hlt1_w3 if stayer == 1 & present_w2 == 0 & present_w1 == 0
**Replicate supplemntary table 29 row 2 column 3
svy: mean anx_eco1_w3 if stayer == 1 & (present_w2 == 1 | present_w1 == 1)
**Replicate supplemntary table 29 row 2 column 4
svy: mean anx_eco1_w3 if stayer == 1 & present_w2 == 0 & present_w1 == 0

svyset [pweight=weight_w4]
**Replicate supplemntary table 29 row 3 column 1
svy: mean anx_hlt1_w4 if stayer == 1 & (present_w3 == 1 | present_w2 == 1 | present_w1 == 1)
**Replicate supplemntary table 29 row 3 column 2
svy: mean anx_hlt1_w4 if stayer == 1 & present_w3 == 0 & present_w2 == 0 & present_w1 == 0
**Replicate supplemntary table 29 row 3 column 3
svy: mean anx_eco1_w4 if stayer == 1 & (present_w3 == 1 | present_w2 == 1 | present_w1 == 1)
**Replicate supplemntary table 29 row 3 column 4
svy: mean anx_eco1_w4 if stayer == 1 & present_w3 == 0 & present_w2 == 0 & present_w1 == 0

********************************************************************************
*** END
********************************************************************************
